package org.openems.entity;

public abstract class AbstractEntity implements Entity, Cloneable {

	private boolean persisted;
	private String name;
	private Key key;
	
	@Override
	public boolean isPersistable() {
		return this.persisted;
	}

	
	@Override
	public void setKey(Key key) {
		this.key = key;
	}

	/**
	 * 
	 */
	private static final long serialVersionUID = 3436717998308628161L;

	public AbstractEntity(Key key, String name, boolean persisted) {
		super();
		this.name = name;
		this.key = key;
		this.persisted = persisted;
	}


	@Override
	public String getName() {
		return this.name;
	}

	@Override
	public Key getKey() {
		return this.key;
	}

	
}
